﻿using System.Web.Mvc;
using SimpleMvcCaptcha.Utils;

namespace CaptchaSample.Controllers
{
    public class MainController : Controller
    {
        public ActionResult Index()
        {
            return View();
        }

        [HttpPost]
        public ActionResult Validate()
        {
            ViewBag.Message = CaptchaUtils.Validate()
                                  ? "Success"
                                  : "Error";
            
            return View();
        }
    }
}
